home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 9 / FM Towns Free Software Collection 9.iso / taropyon / silib / inc / sictrl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-16  |  2.3 KB  |  97 lines

  1. #ifndef    _SICTRL_H
  2. #define    _SICTRL_H
  3.  
  4. #ifndef    _SITYPES_H
  5. #    include    <sitypes.h>
  6. #endif
  7. #ifndef    _SIDEFS_H
  8. #    include    <sidefs.h>
  9. #endif
  10.  
  11. typedef struct    _siproc_t        /* GUI 部品構造体    */
  12. {
  13.     struct _siproc_t    *next;
  14.     CONST char            *name;                /* 名前            */
  15.     int                    typ;                /* 種別            */
  16.     PTR_T                (*constFunc)();        /* 作成関数        */
  17.     int                    (*destFunc)();        /* 破壊関数        */
  18.     int                    (*execFunc)();        /* 実行関数        */
  19. } SIPROC_T;
  20.  
  21. typedef    struct _siobj_t
  22. {
  23.     struct _siobj_t        *next, *prev;
  24.     struct _siobj_t        *parent, *child;
  25.     CONST char            *name;
  26.     int                    typ;                /* 種別            */
  27.     SIPROC_T            *proc;                /* 部品データ    */
  28.     unsigned int        att;                /* 属性            */
  29.     unsigned int        stt;                /* 状態            */
  30.     void                *para;
  31.     char                dat[1];                /* データ        */
  32. } SIOBJ_T;
  33.  
  34. typedef    struct
  35. {
  36.     RECTANGLE_T    box;        /* 基準座標と大きさ    */
  37.     POINT_T        hp;            /* 物理座標            */
  38. } SIORDER_T;
  39.  
  40.  
  41. typedef    struct
  42. {
  43.     RECTANGLE_T            fr;
  44.     int                    fil;                /* 塗りつぶし    */
  45.     COLOR_T                col;                /* 色            */
  46. } SIRECT_T;
  47.  
  48.  
  49. #define    SITYP_DMY            (0)
  50. #define    SITYP_ORDER        (1)
  51. #define    SITYP_RECT            (11)    /* 矩形    */
  52.  
  53. typedef struct
  54. {
  55.     SIPROC_T    *topProc;
  56.     SIOBJ_T        *topObj;
  57.  
  58.     CONST char    *errMsg;
  59.     char        errMsgBuf[512];
  60.  
  61. } SICTRL_T;
  62.  
  63. extern    SICTRL_T    SiCtrl;    /* GUI 制御用    */
  64.  
  65. #define    SIOPEN_MODE_CHILD        (0)
  66. #define    SIOPEN_MODE_BROTHER        (1)
  67.  
  68. #define    SISTT_OFF                (0)
  69. #define    SISTT_SLEEP                (1)
  70. #define    SISTT_ACTIVE            (2)
  71.  
  72. /*----------------------------------------------------------------------*/
  73. #define    SIOBJ_CONST(_proc)        (((_proc)->constFunc)())
  74. #define    SIOBJ_DEST(_proc,_obj)    (((_proc)->destFunc)((_obj)))
  75. #define    SIOBJ_EXEC(_proc,_obj)    (((_proc)->execFunc)((_obj)))
  76.  
  77. /*----------------------------------------------------------------------*/
  78.  
  79. /*    "si_010.c"    ------------------------------------------------------*/
  80. extern    int        SI_init(void);
  81. extern    void    SI_term(void);
  82.  
  83. /*    "si_020.c"    ------------------------------------------------------*/
  84. extern    SIPROC_T    *SI_makeProc( PTR_T (*constFunc)(), int (*destFunc)(), int (*execFunc)());
  85.  
  86. /*    "si_030.c"    ------------------------------------------------------*/
  87. #define    SI_LINKMODE_NEXT    (1)
  88. #define    SI_LINKMODE_PREV    (2)
  89. #define    SI_LINKMODE_CHILD    (3)
  90. #define    SI_LINKMODE_PARENT    (4)
  91. #define    SI_LINKMODE_LAST    (5)
  92. #define    SI_LINKMODE_TOP        (6)
  93.  
  94. extern    int        SI_linkObj( int mode, SIOBJ_T **basObj, SIOBJ_T *newObj );
  95.  
  96. #endif
  97.